/**
 * 列表reducer
 * created by xq on 2018/10/16
 */
const initState = [1, 2, 3]
export default function items (state = initState, action) {
  switch (action.type) {
    case 'DEL_ITEM':
      // 删除
      return state.map(v => v !== action.id)
    default:
      return state
  }
}